<div class="refentry" lang="en" xml:lang="en"><a id="glInterleavedArrays"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glInterleavedArrays — simultaneously specify and enable several interleaved arrays</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table><tr><td><code class="funcdef">void <b class="fsfunc">glInterleavedArrays</b>(</code></td><td>GLenum  </td><td><var class="pdparam">format</var>, </td></tr><tr><td> </td><td>GLsizei  </td><td><var class="pdparam">stride</var>, </td></tr><tr><td> </td><td>const GLvoid *  </td><td><var class="pdparam">pointer</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>format</code></em></span></dt><dd><p>
                    Specifies the type of array to enable. Symbolic constants
                    <code class="constant">GL_V2F</code>,
                    <code class="constant">GL_V3F</code>,
                    <code class="constant">GL_C4UB_V2F</code>,
                    <code class="constant">GL_C4UB_V3F</code>,
                    <code class="constant">GL_C3F_V3F</code>,
                    <code class="constant">GL_N3F_V3F</code>,
                    <code class="constant">GL_C4F_N3F_V3F</code>,
                    <code class="constant">GL_T2F_V3F</code>,
                    <code class="constant">GL_T4F_V4F</code>,
                    <code class="constant">GL_T2F_C4UB_V3F</code>,
                    <code class="constant">GL_T2F_C3F_V3F</code>,
                    <code class="constant">GL_T2F_N3F_V3F</code>,
                    <code class="constant">GL_T2F_C4F_N3F_V3F</code>,
                    and
                    <code class="constant">GL_T4F_C4F_N3F_V4F</code>
                    are accepted.
                </p></dd><dt><span class="term"><em class="parameter"><code>stride</code></em></span></dt><dd><p>
                    Specifies the offset in bytes between each aggregate array element.
                </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
            <code class="function">glInterleavedArrays</code> lets you specify and enable individual color,
            normal,
            texture and vertex
            arrays whose elements are part of a larger aggregate array element.
            For some implementations, this is more efficient than specifying the arrays
            separately.
        </p><p>
            If <em class="parameter"><code>stride</code></em> is 0, the aggregate elements are stored consecutively.
            Otherwise, <em class="parameter"><code>stride</code></em> bytes occur between the beginning of one
            aggregate array element and the beginning of the next aggregate array
            element.
        </p><p>
            <em class="parameter"><code>format</code></em> serves as a ``key''
            describing the extraction of individual arrays from the aggregate array.
            If <em class="parameter"><code>format</code></em> contains a T, then texture coordinates are
            extracted from the interleaved array.  If C is present, color values
            are extracted. If N is present, normal coordinates are extracted.
            Vertex coordinates are always extracted.
        </p><p>
            The digits 2, 3, and 4 denote how many values are extracted.
            F indicates that values are extracted as floating-point values.
            Colors may also be extracted as 4 unsigned bytes if 4UB follows the
            C.  If a color is extracted as 4 unsigned bytes, the vertex
            array element which follows is located at the first possible
            floating-point aligned address.
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
            <code class="function">glInterleavedArrays</code> is available only if the GL version is 1.1 or greater.
        </p><p>
            If <code class="function">glInterleavedArrays</code> is called while compiling a display list, it is not
            compiled into the list, and it is executed immediately.
        </p><p>
            Execution of <code class="function">glInterleavedArrays</code> is not allowed between the execution of
            <a class="citerefentry" href="glBegin"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a> and the corresponding execution of <a class="citerefentry" href="glEnd"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>,
            but an error may or may not be generated. If no error is generated,
            the operation is undefined.
        </p><p>
            <code class="function">glInterleavedArrays</code> is typically implemented on the client side.
        </p><p>
            Vertex array parameters are client-side state and are therefore not
            saved or restored by <a class="citerefentry" href="glPushAttrib"><span class="citerefentry"><span class="refentrytitle">glPushAttrib</span></span></a> and <a class="citerefentry" href="glPopAttrib"><span class="citerefentry"><span class="refentrytitle">glPopAttrib</span></span></a>.
            Use <a class="citerefentry" href="glPushClientAttrib"><span class="citerefentry"><span class="refentrytitle">glPushClientAttrib</span></span></a> and <a class="citerefentry" href="glPopClientAttrib"><span class="citerefentry"><span class="refentrytitle">glPopClientAttrib</span></span></a> instead.
        </p><p>
            For OpenGL versions 1.3 and greater, or when the <code class="code">ARB_multitexture</code> extension is supported, <code class="function">glInterleavedArrays</code>
            only updates the texture coordinate array for the client active texture
            unit. The texture coordinate state for other client texture units is not
            updated, regardless of whether the client texture unit is enabled or not.
        </p><p>
            Secondary color values are not supported in interleaved vertex array formats.
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
            <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>format</code></em> is not an accepted value.
        </p><p>
            <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>stride</code></em> is negative.
        </p></div>
        {$pipelinestall}{$examples}
        <div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
            <a class="citerefentry" href="glArrayElement"><span class="citerefentry"><span class="refentrytitle">glArrayElement</span></span></a>,
            <a class="citerefentry" href="glClientActiveTexture"><span class="citerefentry"><span class="refentrytitle">glClientActiveTexture</span></span></a>,
            <a class="citerefentry" href="glColorPointer"><span class="citerefentry"><span class="refentrytitle">glColorPointer</span></span></a>,
            <a class="citerefentry" href="glDrawArrays"><span class="citerefentry"><span class="refentrytitle">glDrawArrays</span></span></a>,
            <a class="citerefentry" href="glDrawElements"><span class="citerefentry"><span class="refentrytitle">glDrawElements</span></span></a>,
            <a class="citerefentry" href="glEdgeFlagPointer"><span class="citerefentry"><span class="refentrytitle">glEdgeFlagPointer</span></span></a>,
            <a class="citerefentry" href="glEnableClientState"><span class="citerefentry"><span class="refentrytitle">glEnableClientState</span></span></a>,
            <a class="citerefentry" href="glGetPointerv"><span class="citerefentry"><span class="refentrytitle">glGetPointerv</span></span></a>,
            <a class="citerefentry" href="glIndexPointer"><span class="citerefentry"><span class="refentrytitle">glIndexPointer</span></span></a>,
            <a class="citerefentry" href="glNormalPointer"><span class="citerefentry"><span class="refentrytitle">glNormalPointer</span></span></a>,
            <a class="citerefentry" href="glSecondaryColorPointer"><span class="citerefentry"><span class="refentrytitle">glSecondaryColorPointer</span></span></a>,
            <a class="citerefentry" href="glTexCoordPointer"><span class="citerefentry"><span class="refentrytitle">glTexCoordPointer</span></span></a>,
            <a class="citerefentry" href="glVertexPointer"><span class="citerefentry"><span class="refentrytitle">glVertexPointer</span></span></a>
        </p></div><div class="refsect1" lang="en" xml:lang="en"><div id="Copyright"><h2>Copyright</h2><p>
            Copyright © 1991-2006
            Silicon Graphics, Inc. This document is licensed under the SGI
            Free Software B License. For details, see
            <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
        </p></div></div></div>
